<?php

require_once './application/controllers/ControllerBase.php';
require_once './application/core/CoreBase.php';
require_once './application/core/Log/IndexCore.php';
require_once './application/core/Log/logCore.php';
require_once './application/core/Log/logData.php';
require_once './application/core/Config/backupCore.php';

class LogController extends ControllerBase
{

    function indexAction()
    {
        $this->verifConnexion();
        $this->renderTabControl();
        $core = new IndexCore($this);
        $core->Execute();
    }

    //Creation d un filtre pour les logs
    function createfilterAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logFilter($this);
        $t->createFilter();
    }

    //mise a jour d un filtre pour les logs
    function updatefilterAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logFilter($this);
        $t->updateFilter();
    }

    //recupere les filtres en base pour le visu
    function getlistfilterAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logFilter($this);
        $t->getListFilterBase();
    }

    function geinfofilterAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logData($this);
        $t->getInfoFilterBase();
    }

    //recupere les filtres en base pour le visu
    function getlistuserAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new backupCore($this);
        $t->getListUserBase();
    }

    //Service appel de log perl
    function logAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logCore($this);
        $t->log();
    }

    //Service reponse de log perl
    function logrespAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logCore($this);
        $t->logResp();
    }

    function delfiltreAction()
    {
        $this->verifConnexion();
        $this->noRender();
        $t = new logFilter($this);
        $t->delLog();
    }

}
